#pragma once
#include "Odbc.h"

#ifdef DBMS_USE_SQLSERVER

LIBDBC_BEGIN_NAMESPACE


class SqlServer :public Odbc
{
public:
	SqlServer();
	~SqlServer();

protected:
	virtual bool _connect(const char* host, const char* database, const char* user, const char* pwd, int port = 1433);
	virtual bool _connect(const char* host, const char* user, const char* pwd, int port = 1433);

	virtual void _use(const char* database);

	virtual bool _createConnectedHDBC(SQLHDBC* phdbc);
	virtual void _internalSwitchDatabase(HDBC hdbc, const char* database);

protected:
	static int _nInstances;
	static SQLHENV _hEnv;
};

LIBDBC_END_NAMESPACE

#endif
